<div class="bread">
	<ul class="br">
		<li class="home"><a
			href="<?php echo URLUltil::adminPage($this->getContext());?>">DashBoard</a></li>
		<li><a href="#"><?php echo $this->getControllerName()?> Manager</a></li>
		<li><span>List</span></li>
	</ul>
</div>
<?php $this->viewMessage();
?>

<div class="tabledata">
	<table class="tgrid">
		<thead>
			<tr>
				<th class="ordinal">#</th>
				<th class="checkbox"><input type="checkbox" name="checkall"></th>
				<th sortmember="image">Hình ảnh</th>
				<th sortmember="name">Tên</th>
				<th sortmember="level">Level</th>
				<th sortmember="parentname">Danh mục cha</th>
				<th sortmember="statusname">Trạng thái</th>
				<th sortmember="id">ID</th>
			</tr>
		</thead>
		<tbody>
		<?php 
		if(isset($this->searchResults)){
		$order = 1;
			foreach ($this->searchResults[Constant::RESULTS] as $value) {
				$class = "";
				if($order % 2 == 0) $class = ' class="focus"';
				echo '<tr'.$class.'>';
					echo '<td class="ordinal">'.$order.'</th>';
					echo '<td class="checkbox"><input type="checkbox" name="NewsCat_'.$value[NewsCat::ID].'"></td>';
					echo '<td></td>';
					echo '<td sortmember="name"><a href="'.URLUltil::newsCatLink($this->getContext(), $value[NewsCat::ID]).'">'.$value[NewsCat::NAME].'</a></td>';
					echo '<td sortmember="level">'.$value[NewsCat::LEVEL].'</td>';
					echo '<td sortmember="parentname">'.$value["parentname"].'</td>';
					echo '<td sortmember="statusname">'.$value[NewsCat::STATUSNAME].'</td>';
					echo '<td sortmember="id">'.$value[NewsCat::ID].'</td>';
				echo '</tr>';
				$order++;
			}
		}?>
		</tbody>
		<tfoot>
			<tr class="pagenav">
				<td colspan="9">
					<?php $this->renderSearchFoorter($this->searchResults)?>
				</td>
			</tr>
		</tfoot>
</table>
</div>